<%= render(Polaris::BaseComponent.new(**@system_arguments)) do %>
  <%= polaris_stack(distribution: :trailing, spacing: :tight) do |stack| %>
    <% if secondary_actions %>
      <% stack.with_item do %>
        <%= polaris_button_group do |group| %>
          <% secondary_actions.each do |action| %>
            <% group.with_item do %>
              <%= action %>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>

    <% if primary_action %>
      <% stack.with_item do %>
        <%= primary_action %>
      <% end %>
    <% end %>
  <% end %>
<% end %>
